import request from './axios'

/**
 * 窗口退费管理API接口
 */
const feeRefundApi = {
  /**
   * 获取退费列表（分页）
   * @param {Object} params - 查询参数
   * @returns {Promise}
   */
  getRefundList: (params = {}) => {
    return request.get('/fee/refund/list', {
      params: {
        ...params
      }
    })
  },

  /**
   * 单条退费
   * @param {Number} id - 检验申请ID
   * @returns {Promise}
   */
  refundSingle: (id) => {
    return request.post('/fee/refund/single', null, {
      params: {
        id
      }
    })
  },

  /**
   * 批量退费
   * @param {Array} ids - 检验申请ID列表
   * @returns {Promise}
   */
  refundBatch: (ids) => {
    return request.post('/fee/refund/batch', ids)
  }
}

export default feeRefundApi